export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' }
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user'],
    routes: [
      // home
      { path: '/', redirect: '/home/apply' }, {
        path: '/dashboard',
        name: 'dashboard',
        icon: 'dashboard',
        routes: [{
          path: '/dashboard/workplace',
          name: 'workplace',
          component: './Dashboard/Workplace',
        }, ],
      }, {
        path: '/home',
        name: 'home',
        icon: 'home',
        routes: [{
          path: '/home/apply',
          name: 'apply',
          component: './Home/Apply',
        }, {
          path: '/home/goods',
          name: 'goods',
          component: './Home/Goods/index',
          hideChildrenInMenu: true,
          routes: [{
            path: '/home/goods',
            redirect: '/home/goods/lists',
          }, {
            path: '/home/goods/lists',
            name: 'lists',
            component: './Home/Goods/Lists',
          }, {
            path: '/home/goods/profile',
            name: 'profile',
            component: './Profile/AdvancedProfile',
          }],
        }, ],
      }, {
        path: '/goods',
        name: 'goods',
        icon: 'gift',
        routes: [
          // 奖品列表
          {
            path: '/goods/@',
            name: 'rows',
            component: './Goods/index',
            hideChildrenInMenu: true,
            routes: [{
              path: '/goods/@',
              redirect: '/goods/@/list',
            }, {
              path: '/goods/@/list',
              name: 'list',
              component: './Goods/Rows',
            }, {
              path: '/goods/@/profile',
              name: 'profile',
              component: './Profile/AdvancedProfile',
            }],
          }
        ],
      }, {
        path: '/users',
        name: 'users',
        icon: 'team',
        routes: [
          // profile
          {
            path: '/users/list',
            name: 'list',
            component: './Users',
          },
          // goods
          // {
          //   path: '/users/goods',
          //   name: 'goods',
          //   component: './Users/Goods',
          // }
        ],
      }, {
        path: '/banners',
        name: 'banners',
        icon: 'picture',
        routes: [
          // 广告中心
          {
            path: '/banners/center',
            name: 'center',
            component: './Banners/Center',
          },
          // 广告管理
          {
            path: '/banners/manage',
            name: 'manage',
            component: './Banners/Manage',
          },
        ],
      }, {
        path: '/helps',
        name: 'helps',
        icon: 'question-circle',
        routes: [{
          path: '/helps/questions',
          name: 'questions',
          component: './Helps/Questions',
        }, {
          path: '/helps/feedbacks',
          name: 'feedbacks',
          component: './Helps/Feedback',
        }],
      },
      // {
      //   path: '/integral',
      //   name: 'integral',
      //   icon: 'team',
      //   component: './Integral',
      // }, 
      {
        path: '/systems',
        name: 'systems',
        icon: 'windows',
        component: './Systems',
      }, {
        path: '/recoveries',
        name: 'recoveries',
        icon: 'delete',
        component: './Recoveries',
      }, {
        name: 'exception',
        icon: 'warning',
        path: '/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          }, {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          }, {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          }, {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      }, {
        component: '404',
      },
    ],
  },
];